<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>
		<jsp:include page="include/title.jsp"></jsp:include>
		</title>
		<link href="${pageContext.request.contextPath}/css/style.css" type="text/css" rel="stylesheet">
		<link href="${pageContext.request.contextPath}/css/union.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.4.min.js"></script>
		<style type="text/css">
			.grayF {
				color: #666666;
				font-weight: bold;
				font-size: 14px;
			}
			
			.redF {
				color: #FF0000
			}
		</style>
	</head>

	<body>
		<div align="center">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tbody>
					<tr>
						<td height="120"></td>
					</tr>
					<tr>
						<td valign="top">
							<div align="center">
								<form name=form1 method="post" action="${pageContext.request.contextPath}/doLogin.action" onsubmit="return checkForm()">
									<table width="489"
										background="${pageContext.request.contextPath}/images/map.gif"
										border="0" cellpadding="0" cellspacing="0" >
										<tbody>		
											<tr>
												<td colspan="2" height="72" align="center" >
													<img src="${pageContext.request.contextPath}/images/denglu.gif" height="32" width="151">
													<span style="font: bold;font-size: 14px;">Free Version</span>
												</td>
											</tr>
											<tr>
												<td height="134" width="20%">&nbsp;
												</td>
												<td valign="middle" align="left">
													<table width="100%" border="0" cellpadding="0"
														cellspacing="0">
														<tbody>
															<tr>
																<td height="32" valign="middle" width="50" align="left">
																	<span class="grayF">用户名:</span>
																</td>
																<td width="234">
																	<table height="25" width="196" border="0"
																		cellpadding="0" cellspacing="0">
																		<tbody>
																			<tr>
																				<td>
																					&nbsp;
																					<input id="userName" name="userName" maxlength="30" size="32"
																						value="${userName}"
																						onblur="this.style.background='#FFFFFF'; this.style.border='1px solid #597EFF'"
																						onfocus="this.style.background='#FFFFFF'; this.style.borderTop='1px solid #000000'; this.style.borderRight='1px solid #CCC'; this.style.borderBottom='1px solid #CCC'; this.style.borderLeft='1px solid #000000';"
																						class="txBox_b" type="text">
																				</td>
																			</tr>
																		</tbody>
																	</table>
																</td>
																<td>&nbsp;<span id="error_user" class="redF">${error_msg}</span></td>
															</tr>
															<tr>
																<td height="32" valign="middle" align="left">
																	<span class="grayF">密 码:</span>
																</td>
																<td>
																	<table height="25" width="196" border="0"
																		cellpadding="0" cellspacing="0">
																		<tbody>
																			<tr>
																				<td>
																					&nbsp;
																					<input id="password" name="password" maxlength="30" size="32"
																						value=""
																						onblur="this.style.background='#FFFFFF'; this.style.border='1px solid #597EFF'"
																						onfocus="this.style.background='#FFFFFF'; this.style.borderTop='1px solid #000000'; this.style.borderRight='1px solid #CCC'; this.style.borderBottom='1px solid #CCC'; this.style.borderLeft='1px solid #000000';"
																						class="txBox_b" type="password">
																				</td>
																			</tr>
																		</tbody>
																	</table>
																</td>
																<td>&nbsp;<span id="error_psw" class="redF"></span></td>
															</tr>														
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td colspan="2" height="55" align="center">
													<table width="60%" border="0" cellpadding="0" cellspacing="0">
														<tbody>
															<tr>
																<td width="65%" align="center">
																	<input
																		src="${pageContext.request.contextPath}/images/login.gif"
																		height="21" type="image" width="62">
																</td>
																<td>
																	<a href="#"	target="_blank">
																		<img border="0" src="${pageContext.request.contextPath}/images/reset.gif">
																	</a>
																</td>

															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
								</form>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>

		<script language="javascript">
 			function checkForm(){
 				var userName = $("#userName").val();
 				var password = $("#password").val();
 				$("#error_user").text("");
 				$("#error_psw").text("");
 				if(userName==null || userName==""){
 					$("#error_user").text("请输入用户名");
 					return false;
 				}
 				if(password==null || password==""){
 					$("#error_psw").text("请输入密码");
 					return false;
 				}
 				return true;
 			}
		</script>

	</body>
</html>